use chrono::{DateTime, Local};

#[derive(Clone, Debug)]
pub struct LocalSeq {
    value: u64,
}

impl LocalSeq {
    pub fn new(date: &DateTime<Local>) -> LocalSeq {
        LocalSeq { value: date.timestamp_nanos_opt().unwrap().unsigned_abs() }
    }
    
    pub fn increase(&mut self) -> u64 {
        self.value = self.value + 1;
        self.value
    }
    
}